package com.sll.hosptials.model;

import com.alibaba.excel.annotation.ExcelProperty;
import com.baomidou.mybatisplus.annotation.*;

import java.io.Serializable;
import java.util.Date;

import com.sll.hosptials.handler.CommonHandler;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

/**
 * 用户表
 * @TableName user_info
 */
@TableName(value ="user_info")
@Data
public class UserInfo implements Serializable {
    /**
     * 用户id
     */
    @TableId(type = IdType.AUTO)
    @ApiModelProperty(value = "用户id")
    private Long userId;

    /**
     * 用户名
     */
//    @ExcelProperty("字符串标题")
    private String userName;

    /**
     * 联系方式
     */
    private String phone;

//    @TableField( typeHandler = )
    @TableField(value = "password",typeHandler = CommonHandler.class)
    private String password;

    /**
     * 逻辑删除
     */
    @TableLogic
    private Integer deleted;

    @ApiModelProperty("创建时间")
    @TableField(fill = FieldFill.INSERT)
    private Date createDateTime;

    @ApiModelProperty("更新时间")
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private Date updateDateTime;

    /**
     * 是否生效
     */
    private Boolean enable;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;
}